\documentclass{article}
\usepackage{amssymb,amsmath} % import math
\usepackage[german]{babel} % import german
\usepackage[applemac]{inputenc} % import german apple
\usepackage{graphicx} % import graphics
\usepackage[babel,german=quotes]{csquotes} % quoting

\title{HA2 - Uebung 5}
\author{Leonardo Balestrieri, Marco Traeger}

% some newdefs for math symbols
\newcommand{\lfollow}{\rightarrow} % logical follow
\newcommand{\sfollow}{\Longrightarrow} % semantic follow
\newcommand{\siff}{\iff} % semantic iff
\newcommand{\lAnd}[2]{\bigwedge_{#1}^{#2}} % big and
\newcommand{\lOr}[2]{\bigvee_{#1}^{#2}} % big or

\newcommand{\Oc}[2]{\overset{#1}{#2}}
\newcommand{\Uc}[2]{\underset{#1}{#2}}
\newcommand{\OC}[2]{\Oc{#1}{\overbrace{#2}}}
\newcommand{\UC}[2]{\Uc{#1}{\underbrace{#2}}}
\newcommand{\case}[1]{\quad Fall #1 :\\\\}

\begin{document}
\parindent 0pt %keine Zeileneinrueckungen

\maketitle

\section*{5.2a}
$x_{i+1} =  x_i - \frac{f(x_i)}{f^{'}(x_i)} = x_i - \frac{\frac{1}{x} -a}{-\frac{1}{x_i^{2}}} = 2x_i - ax_i^2$ \\
Sei $\epsilon_i$ der Fehler nach dem $i$-ten Schritt, dann gilt. \\
$\frac{1}{a} - x_i = \epsilon_i$ \\

dann gilt: $\frac{1}{a} - x_i = \epsilon_i \siff x_i = \frac{1}{a} - \epsilon_i$ und \\
\begin{equation}
\begin{split}
 x_{i+1} &= 2x_i - ax_i^2 \\
&= 2(\frac{1}{a} - \epsilon_i) - a(\frac{1}{a} - \epsilon_i)^2 \\
&= 2\frac{1}{a} - 2\epsilon_i - a(\frac{1}{a^2} - 2\frac{\epsilon_i}{a} + \epsilon_i^2) \\
&= 2\frac{1}{a} - 2\epsilon_i - \frac{1}{a} + 2\epsilon_i - a\epsilon_i^2 \\
&= \frac{1}{a} - a\epsilon_i^2 \\
& \sfollow \epsilon_{i+1} = a\epsilon_{i}^2
\end{split}
\end{equation}

Es muss gelten $\epsilon_i < \epsilon_{i+1} \forall i$, daher auch $\epsilon_0 < \epsilon_1$. \\
$\sfollow \epsilon_0 < a\epsilon_{1}^2 = a(\frac{1}{a} - x_0)^2 = a\frac{1}{a^2} - a\frac{2x_0}{a} + ax_0^2$ \\
$\iff \epsilon_0 < \frac{1}{a} - 2x_0 + ax_0^2$ \\
$\iff \frac{1}{a} - x_0 < \frac{1}{a} - 2x_0 + ax_0^2 \iff x_0 < ax_0^2$ \\
$\iff \frac{x_0}{{x_0^2}} < a \iff \frac{1}{{x_0}} < a$ \\
$\iff \frac{1}{a} < x_0$ f\"ur $x_0$.

\section*{5.2b2}
$x_{i+1} = x_i - \frac{f(x_i)}{f'(x_i)} = x_i - \frac{x_i^2 - a}{2x_i} = \frac{1}{2} (x_i + \frac{a}{x_i})$ \\
Sei $\epsilon_i$ der Fehler nach dem $i$-ten Schritt, dann gilt. \\
$\sqrt{a} - x_i = \epsilon_i$ \\
$\sfollow \exists \varphi_i : x_i = \sqrt{a} \varphi_i$ daher\\

\begin{equation}
\sqrt{a} - \sqrt{a}\varphi_i = \epsilon_i \siff \varphi_i = -\frac{\epsilon_i - \sqrt{a}}{\sqrt{a}}
\end{equation}

\begin{equation}
\begin{split}
x_{i+1} =& \frac{1}{2} (x_i + \frac{a}{x_i}) \\
=& \frac{1}{2} (\sqrt{a} \varphi_i + \frac{a}{\sqrt{a} \varphi_i}) = \frac{1}{2} (\sqrt{a} \varphi_i + \frac{\sqrt{a}}{\varphi_i}) \\
=& \frac{1}{2} \sqrt{a} (\varphi_i + \frac{1}{\varphi_i}) \\
=& \frac{1}{2} \sqrt{a} (-\frac{\epsilon_i - \sqrt{a}}{\sqrt{a}} - \frac{\sqrt{a}}{\epsilon_i - \sqrt{a}}) \\
=& \frac{1}{2} (-\epsilon_i + \sqrt{a} - \frac{a}{\epsilon_i - \sqrt{a}}) \\
=& \sqrt{a} - \frac{1}{2} (\epsilon_i + \sqrt{a} + \frac{a}{\epsilon_i - \sqrt{a}}) \\
=& \sqrt{a} - \frac{1}{2} (\frac{(\epsilon_i + \sqrt{a})(\epsilon_i - \sqrt{a}) + a}{\epsilon_i - \sqrt{a}}) \\
=& \sqrt{a} - \frac{1}{2} (\frac{\epsilon_i^2 - a + a}{\epsilon_i - \sqrt{a}}) = \sqrt{a} - \frac{1}{2} (\frac{\epsilon_i^2}{\epsilon_i - \sqrt{a}})\\
& \sfollow \epsilon_{i+1} = \frac{1}{2} (\frac{\epsilon_i^2}{\epsilon_i - \sqrt{a}})
\end{split}
\end{equation}

\end{document}